<script type="text/javascript" src="images/bmb_ajax.js"></script>
<script type="text/javascript">
//<![CDATA[ 
var signmaxchars = {echo $max_sign_length};
function setrepeat() {
document.creator.addpassword2.value=document.creator.addpassword.value;
}
function validate(theform) {
	if (theform.addusername.value=="" || theform.addpassword.value=="") {
		alert("{reglang[50]}");
		return false; }
	if (signmaxchars != 0 && theform.signature) {
		if (theform.signature.value.length > {echo $max_sign_length}) {
			alert("{reglang[51]}");
			return false; }
		else { document.getElementById("quicksubmit").disabled=true; return true; }
	} else { document.getElementById("quicksubmit").disabled=true; return true; }
}
function CheckUsername_AJAX(autocheck){
	var Name=document.creator.addusername.value;
	if(Name==""){
		document.getElementById("checkuser").innerHTML="{reglang[52]}";
		return false;
	}else{
		document.body.style.cursor = 'wait';
		makeRequest("register.php?action=check&addusername="+bmb_ajax_encode(Name),null,bmb_ajax_checkuser_back,"GET");
	}
}
function bmb_ajax_checkuser_back() {
	if (http_request.readyState == 4) {
		if (http_request.status == 200) {
		    document.body.style.cursor = '';
			result = http_request.responseText;
			document.getElementById("checkuser").innerHTML = result;
		} else {
		    document.body.style.cursor = '';
			alert('Error: '+http_request.responseText);
		}
	}
}
function openavarts(){
openscript("misc.php?p=listpic&dir=face",700,500);
}
function showimage(){
     document.images.useravatars.src="images/avatars/"+document.creator.sysusericon.options[document.creator.sysusericon.selectedIndex].value;
}
//]]>>
</script>
<form style="margin: 0px;" action="register.php" method="post" name="creator" onsubmit="return validate(this)">
<input type="hidden" value="{echo $method}" name="method" />
<table class="tableborder" cellspacing="0" cellpadding="0"  align="center" border="0">
	<tr>
		<td>
		<table cellspacing="1" cellpadding="4" width="100%" border="0">
				<tr class="tile_back_nowidth">
					<td class="forum_border_one_3" colspan="2" >
					<span class="title">{reglang[53]}&nbsp; {echo $sts}</span></td>
				</tr>
				<tr class="forumcoloronecolor">
					<td class="forum_border_one_3" width="20%" valign="middle">&nbsp;{reglang[54]}<span class="jiazhongcolor">*</span></td>
					<td class="forum_border_one_3" width="80%"><strong>
					<input type="text" title="{reglang[55]}" size="25" maxlength="14" value="{echo $addusername}" onblur="javascript:CheckUsername_AJAX(1);" name="addusername"  /></strong><div id="checkuser"></div></td>
				</tr>
<!--{if $send_pass!=1 }-->
				<tr class="forumcoloronecolor">
					<td class="forum_border_one_3" valign="middle">&nbsp;{reglang[57]}<span class="jiazhongcolor">*</span></td>
					<td class="forum_border_one_3">
					<input type="password" size="25" maxlength="75" value="{echo $addpassword}" name="addpassword" title="{reglang[58]}" /></td>
				</tr>
				<tr class="forumcoloronecolor">
					<td class="forum_border_one_3" valign="middle">&nbsp;{reglang[59]}<span class="jiazhongcolor">*</span></td>
					<td class="forum_border_one_3">
					<input type="password" size="25" maxlength="75" value="{echo $addpassword2}" name="addpassword2" title="{reglang[60]}" /></td>
				</tr>
				<tr class="forumcoloronecolor">
					<td class="forum_border_one_3" valign="middle">&nbsp;{reglang[61]}</td>
					<td class="forum_border_one_3">
					<input type="text" size="25" maxlength="30" value="{echo $passask}" name="passask"  /></td>
				</tr>
				<tr class="forumcoloronecolor">
					<td class="forum_border_one_3" valign="middle">&nbsp;{reglang[63]}</td>
					<td class="forum_border_one_3">
					<input type="text" size="25" maxlength="30" value="{echo $passanswer}" name="passanswer"  /></td>
				</tr>
<!--{/if}-->
				<tr class="forumcoloronecolor">
					<td class="forum_border_one_3" valign="middle">&nbsp;{reglang[64]}</td>
					<td class="forum_border_one_3">
					<input type="text" size="25" maxlength="30" value="{echo $tuijianren}" name="tuijianren" title="{reglang[65]}"  /></td>
				</tr>
				<tr class="forumcoloronecolor">
					<td class="forum_border_one_3" valign="middle">&nbsp;E-MAIL:<span class="jiazhongcolor">*</span><br />
					</td>
					<td class="forum_border_one_3">
					<input type="text" size="25" maxlength="75" value="{echo $addemail}" name="addemail" title="{show_form_lng[123]}" /><br />
					<input type="checkbox" title="{show_form_lng[122]}" name="publicmail" value="yes" checked="checked" id="open_1" /><label for="open_1">
					<span class="jiazhongcolor">{show_form_lng[124]} </span></label>
					</td>
				</tr>
<!--{if $reg_va == "1"}-->
				<tr class="forumcoloronecolor">
					<td class="forum_border_one_3" valign="middle">&nbsp;{gl[439]}</td>
					<td class="forum_border_one_3">
					<input type="text" size="25" maxlength="30" name="authinput"  /> 
					{echo $showautonum}</td>
				</tr>
<!--{/if}-->
<!--{if $reg_invit}-->
				<tr class="forumcoloronecolor">
					<td class="forum_border_one_3" valign="middle">&nbsp;{show_form_lng[165]}</td>
					<td class="forum_border_one_3">
					<input type="text" size="25" value="{echo $invitecode}" maxlength="30" name="invitecode"  />
					</td>
				</tr>
<!--{/if}-->
<!--{loop $reg_sc $key $value}-->
				<tr class="forumcoloronecolor">
					<td class="forum_border_one_3" valign="middle">&nbsp;<strong>{echo $value[1]}</strong>
<!--{if $value[2]}--><br />
&nbsp;{echo $value[2]}<!--{/if}--></td>
					<td class="forum_border_one_3">


	<!--{if $value[3] == 1}-->
	<input type="text" size="20" maxlength="{echo $value[10]}" name="custom_var[{echo $value[0]}]" value="{echo $custom[$value[0]]}" />
	<!--{elseif $value[3] == 2}-->
	<textarea cols="50" name="custom_var[{echo $value[0]}]" rows="4">{echo $custom[$value[0]]}</textarea>
	<!--{elseif $value[3] == 3}-->
	<select name="custom_var[{echo $value[0]}]">
	<option value=""></option>
	{echo base64_decode($value[11])}
	</select>
	<!--{/if}-->

					</td>
				</tr>
<!--{/loop}-->

<!--{if $method}-->
				<tr class="forumcoloronecolor">
					<td class="forum_border_one_3">&nbsp;{show_form_lng[125]}</td>
					<td class="forum_border_one_3"><strong>
					<input type="text" value="{echo $qqnumber}" name="qqnumber" size="25" maxlength="14"  /></strong></td>
				</tr>
				<tr class="forumcoloronecolor">
					<td class="forum_border_one_3">&nbsp;{show_form_lng[126]}</td>
					<td class="forum_border_one_3">
					<input type="text" value="{echo $msnurl}" name="msnurl" size="25"  /></td>
				</tr>
				<tr class="forumcoloronecolor">
					<td class="forum_border_one_3">&nbsp;{show_form_lng[127]}</td>
					<td class="forum_border_one_3">
					<input type="text" value="{echo $icqnumber}" name="icqnumber" size="25" maxlength="14"  /></td>
				</tr>
				<tr class="forumcoloronecolor">
					<td class="forum_border_one_3">&nbsp;{show_form_lng[128]}</td>
					<td class="forum_border_one_3"><strong>
					<input type="text" size="25" maxlength="75" value="{echo $homepage}" name="homepage"  /></strong></td>
				</tr>
				<tr class="forumcoloronecolor">
					<td class="forum_border_one_3">&nbsp;{show_form_lng[134]}</td>
					<td class="forum_border_one_3"><select name='addsex'>
<option value='' selected='selected'>{show_form_lng[999]}</option>
<option value="Male" >{show_form_lng[0]}</option>
<option value="Female">{show_form_lng[1]}</option>
<option value="Unknown">{show_form_lng[2]}</option></select></td>
				</tr>
				<tr class="forumcoloronecolor">
					<td class="forum_border_one_3">&nbsp;{show_form_lng[135]}</td>
					<td class="forum_border_one_3"><select name='addnational'><option value='' selected='selected'>{show_form_lng[3]}</option><option value='dont'>{show_form_lng[non]}</option><option value="China">{show_form_lng[4]}</option><option value="Angola">{show_form_lng[5]}</option><option value="Antigua">{show_form_lng[6]}</option><option value="Argentina">{show_form_lng[7]}</option><option value="Armenia">{show_form_lng[8]}</option><option value="Australia">{show_form_lng[9]}</option><option value="Austria">{show_form_lng[10]}</option><option value="Bahamas">{show_form_lng[11]}</option><option value="Bahrain">{show_form_lng[12]}</option><option value="Bangladesh">{show_form_lng[13]}</option><option value="Barbados">{show_form_lng[14]}</option><option value="Belgium">{show_form_lng[15]}</option><option value="Bermuda">{show_form_lng[16]}</option><option value="Bolivia">{show_form_lng[17]}</option><option value="Brazil">{show_form_lng[18]}</option><option value="Brunei">{show_form_lng[19]}</option><option value="Canada">{show_form_lng[20]}</option><option value="Chile">{show_form_lng[21]}</option><option value="Colombia">{show_form_lng[22]}</option><option value="Croatia">{show_form_lng[23]}</option><option value="Cuba">{show_form_lng[24]}</option><option value="Cyprus">{show_form_lng[25]}</option><option value="Czech_Republic">{show_form_lng[26]}</option><option value="Denmark">{show_form_lng[27]}</option><option value="Dominican_Republic">{show_form_lng[28]}</option><option value="Ecuador">{show_form_lng[29]}</option><option value="Egypt">{show_form_lng[30]}</option><option value="Estonia">{show_form_lng[31]}</option><option value="Finland">{show_form_lng[32]}</option><option value="France">{show_form_lng[33]}</option><option value="Germany">{show_form_lng[34]}</option><option value="Great_Britain">{show_form_lng[35]}</option><option value="Greece">{show_form_lng[36]}</option><option value="Guatemala">{show_form_lng[37]}</option><option value="Honduras">{show_form_lng[38]}</option><option value="Hungary">{show_form_lng[39]}</option><option value="Iceland">{show_form_lng[40]}</option><option value="India">{show_form_lng[41]}</option><option value="Indonesia">{show_form_lng[42]}</option><option value="Iran">{show_form_lng[43]}</option><option value="Iraq">{show_form_lng[44]}</option><option value="Ireland">{show_form_lng[45]}</option><option value="Israel">{show_form_lng[46]}</option><option value="Italy">{show_form_lng[47]}</option><option value="Jamaica">{show_form_lng[48]}</option><option value="Japan">{show_form_lng[49]}</option><option value="Jordan">{show_form_lng[50]}</option><option value="Kazakstan">{show_form_lng[51]}</option><option value="Kenya">{show_form_lng[52]}</option><option value="Kuwait">{show_form_lng[53]}</option><option value="Latvia">{show_form_lng[54]}</option><option value="Lebanon">{show_form_lng[55]}</option><option value="Lithuania">{show_form_lng[56]}</option><option value="Malaysia">{show_form_lng[57]}</option><option value="Malawi">{show_form_lng[58]}</option><option value="Malta">{show_form_lng[59]}</option><option value="Mauritius">{show_form_lng[60]}</option><option value="Morocco">{show_form_lng[61]}</option><option value="Mozambique">{show_form_lng[62]}</option><option value="Netherlands">{show_form_lng[63]}</option><option value="New_Zealand">{show_form_lng[64]}</option><option value="Nicaragua">{show_form_lng[65]}</option><option value="Nigeria">{show_form_lng[66]}</option><option value="Norway">{show_form_lng[67]}</option><option value="Pakistan">{show_form_lng[68]}</option><option value="Panama">{show_form_lng[69]}</option><option value="Paraguay">{show_form_lng[70]}</option><option value="Peru">{show_form_lng[71]}</option><option value="Poland">{show_form_lng[72]}</option><option value="Portugal">{show_form_lng[73]}</option><option value="Romania">{show_form_lng[74]}</option><option value="Russia">{show_form_lng[75]}</option><option value="Saudi_Arabia">{show_form_lng[76]}</option><option value="Singapore">{show_form_lng[77]}</option><option value="Slovakia">{show_form_lng[78]}</option><option value="Slovenia">{show_form_lng[79]}</option><option value="Solomon_Islands">{show_form_lng[80]}</option><option value="Somalia">{show_form_lng[81]}</option><option value="South_Africa">{show_form_lng[82]}</option><option value="South_Korea">{show_form_lng[83]}</option><option value="Spain">{show_form_lng[84]}</option><option value="Sri_Lanka">{show_form_lng[285]}</option><option value="Surinam">{show_form_lng[85]}</option><option value="Sweden">{show_form_lng[86]}</option><option value="Switzerland">{show_form_lng[87]}</option><option value="Thailand">{show_form_lng[88]}</option><option value="Trinidad_Tobago">{show_form_lng[89]}</option><option value="Turkey">{show_form_lng[90]}</option><option value="Ukraine">{show_form_lng[91]}</option><option value="United_Arab_Emirates">{show_form_lng[92]}</option><option value="United_States">{show_form_lng[93]}</option><option value="Uruguay">{show_form_lng[94]}</option><option value="Venezuela">{show_form_lng[95]}</option><option value="Vietnam">{show_form_lng[160]}</option><option value="Yugoslavia">{show_form_lng[96]}</option><option value="Zambia">{show_form_lng[97]}</option><option value="Zimbabwe">{show_form_lng[98]}</option></select></td>
				</tr>
				<tr class="forumcoloronecolor">
					<td class="forum_border_one_3">&nbsp;{show_form_lng[136]}</td>
					<td class="forum_border_one_3"><input type="text" name="addborn" size="25" maxlength="10" value="{echo $addborn}" /> ({show_form_lng[99]}) </td>
				</tr>
				<tr class="forumcoloronecolor">
					<td class="forum_border_one_3" valign="middle">&nbsp;{show_form_lng[129]} <br />
&nbsp;<a href="javascript:openScript('bmbcode.php',700,500)">BMB 
					Code</a> - {echo $bmbcodeinfoshows} </td>
					<td class="forum_border_one_3">
					<textarea cols="50" name="signature" rows="4">{echo $signature}</textarea></td>
				</tr>
				<tr class="forumcoloronecolor">
					<td class="forum_border_one_3" valign="middle">&nbsp;{show_form_lng[131]}</td>
					<td class="forum_border_one_3">
					<input type="text" size="25" maxlength="20" value="{echo $fromwhere}" name="fromwhere"  /></td>
				</tr>
				<tr class="forumcoloronecolor">
					<td class="forum_border_one_3">&nbsp;{show_form_lng[132]}<br />
&nbsp;{show_form_lng[133]}</td>
					<td class="forum_border_one_3">
					<textarea name="addcomment" rows="4" cols="50">{echo $addcomment}</textarea></td>
				</tr>
				<tr align="left" class="forumcoloronecolor">
					<td class="forum_border_one_3" align="left" valign="middle">&nbsp;{show_form_lng[139]}
					 </td>
					<td class="forum_border_one_3" valign="top">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="22%" align="left" valign="middle">
							<select name="sysusericon" onchange="showimage()">
							<option selected="selected" value="no_portait.gif">{show_form_lng[141]}
							</option>
							{echo $avinfoshows}</select>
						</td>
							<td width="78%" align="right" valign="middle">
							<img src="images/avatars/no_portait.gif" name="useravatars" border="0" alt="" /></td>
						</tr>
					</table>
				</td>
				</tr>
				<tr align="left" class="forumcoloronecolor">
					<td class="forum_border_one_3" align="left" valign="middle">&nbsp;<strong>{show_form_lng[105]}</strong><br />
					{echo $touxshows}
					 </td>
					<td class="forum_border_one_3" align="left" valign="middle">
<!--{if $use_own_portait == 1 }-->
{show_form_lng[107]}<input type="text" size="35" value="{echo $own_portait[a0]}" name="own_portait[a0]"  />{show_form_lng[110]}<br />
					{show_form_lng[108]}<input type="text" size="2" value="{echo $own_portait[a1]}" maxlength="3" name="own_portait[a1]"  />{show_form_lng[112]} 
					20 -- {echo $maxwidth} {show_form_lng[113]}<br />
					{show_form_lng[109]}<input type="text" size="2" value="{echo $own_portait[a2]}" maxlength="3" name="own_portait[a2]"  />{show_form_lng[112]} 
					20 -- {echo $maxheight} {show_form_lng[113]}
<!--{/if}-->
				</td>
				</tr>
				<tr class="forumcoloronecolor">
					<td class="forum_border_one_3" align="center" colspan="2">&nbsp;{show_form_lng[142]}
					<input type="radio" name="receivemail" value="text" checked="checked" id="open_2" /><label for="open_2"> 
					{show_form_lng[143]}</label>
					<input type="radio" name="receivemail" value="html" id="open_3" /><label for="open_3"> 
					{show_form_lng[144]}</label>
					<input type="radio" name="receivemail" value="none" id="open_4" /><label for="open_4"> 
					{show_form_lng[145]}</label> </td>
				</tr>
<!--{/if}-->
				<tr>
					<td colspan="2" align="center" class="tile_back_nowidth">
					<input type="submit" id="quicksubmit" value="{gl[29]}" />&nbsp;&nbsp;
					<input type="hidden" value="2" name="step" />
					<input type="reset" value="{gl[215]}" />
					</td>
				</tr>
		</table>
		</td>
	</tr>
</table>

</form>
<script type="text/javascript">
//<![CDATA[ 
document.creator.addusername.focus();
//]]>>
</script>